/* AI功能页面通用样式 */

/* 页面基础样式 */
.ai-feature-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.custom-nav-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 功能介绍区域 */
.feature-intro {
  margin: 16px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.intro-content {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.intro-icon {
  font-size: 40px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.intro-text h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.intro-text p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* 模式标签页样式 */
.mode-tabs, .query-tabs, .writing-tabs, .translation-tabs, .companion-tabs, .recommendation-tabs, .game-tabs, .health-tabs {
  margin-top: 16px;
}

.mode-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
}

.tabs-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.mode-tab:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.mode-tab.active {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.tab-icon {
  font-size: 14px;
}

.tab-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 示例标签样式 */
.intro-examples {
  margin-top: 16px;
}

.example-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
}

.example-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.example-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.example-tag:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

/* 聊天区域样式 */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-chat {
  text-align: center;
  padding: 40px 20px;
  color: rgba(30, 41, 59, 0.6);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.message-item {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.message-item.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-item.ai {
  align-self: flex-start;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.message-content {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-item.user .message-content {
  background: #3b82f6;
  color: white;
  border: 1px solid #3b82f6;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.message-time {
  font-size: 12px;
  color: #94a3b8;
  text-align: right;
}

.message-item.user .message-time {
  color: rgba(255, 255, 255, 0.8);
}

/* 输入区域样式 */
.input-container {
  padding: 16px;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.message-input {
  flex: 1;
  background: white;
  border-radius: 20px;
}

.send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* iPad适配 */
@media (min-width: 768px) {
  .ai-feature-page {
    padding: 0 40px;
  }
  
  .feature-intro {
    margin: 30px 0 20px;
    padding: 24px;
  }
  
  .tabs-container {
    gap: 12px;
  }
  
  .mode-tab {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .chat-container {
    padding: 20px 0;
  }
  
  .input-container {
    padding: 20px 0;
  }
}
